using System;
using System.IO;

namespace ChronoNES
{
    class Emulator
    {
        Loader loader;
        Memory memory;
        CPU cpu;

        public Emulator()
        {
        }

        public void LoadROM(FileStream _fs)
        {
            loader = Loader.Create(_fs);
            memory = new Memory(loader.GetMapper());

            cpu = new CPU(memory);
            cpu.Init();
        }
        
        public void Start()
        {
            while (true)
            {
                cpu.Step();
            }
        }

        public void Pause()
        {
        }

        public void Stop()
        {
        }
    }
}